<%@page contentType="text/html;charset=utf-8" pageEncoding="UTF-8" %>
<%@taglib prefix="h" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="b"  uri="http://struts.apache.org/tags-bean" %>
<h1><b:message key="cities_create"/></h1>
<div>
    <h:form action="/protected/city?method=${param['method']}" enctype="multipart/form-data; charset=utf-8">
        <table border="0">

            <tr>
                <td><span class="important"><b:message key="cities_name"/></span></td>
                <td><h:text property="name" size="100" maxlength="512"/><span class="error" ><h:errors property="name" /></span></td>
            </tr>
            <tr>
                <td><b:message key="cities_zip"/></td>
                <td><h:text property="zipCode"/></td>
            </tr>
            <tr>
                <td><b:message key="gen_note"/></td>
                <td><h:textarea property="note" cols="100" rows="10"/></td>
            </tr>

        </table>




        <c:if test="${param['method'] == 'showCreateCityForm'}">
            <h:submit property="submit"><b:message key="gen_create"/></h:submit>
        </c:if>

        <c:if test="${param['method'] == 'showUpdateCityForm'}">
            <h:submit property="submit"><b:message key="gen_update"/></h:submit>
        </c:if>

        <h:cancel><b:message key="gen_cancel"/></h:cancel>
    </h:form>
</div>